From a09e37a8afe5b70661507eb512dc96ecd9804939 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 22 Jan 2007 17:59:41 +0000 Subject: [PATCH] Improve Garmin error case for Windows USB exclusive error failure to point finger at Spanner and GPSGate-like substances. --- jeeps/gpsusbwin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jeeps/gpsusbwin.c b/jeeps/gpsusbwin.c index 1fe48959f..368ae63e4 100644 --- a/jeeps/gpsusbwin.c +++ b/jeeps/gpsusbwin.c @@ -161,6 +161,11 @@ HANDLE * garmin_usb_start(HDEVINFO* hdevinfo, SP_DEVICE_INTERFACE_DATA *infodata usb_handle = CreateFile(pdd->DevicePath, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); if (usb_handle == INVALID_HANDLE_VALUE) { + if (GetLastError() == ACCESS_DENIED) { + warning( +"Exclusive access is denied. It's likely that something else such as\n" +"Nroute, Spanner, Google Earth, or GPSGate already has control of the device\n"); + } GPS_Serial_Error("(usb) CreateFile on '%s' failed", pdd->DevicePath); return NULL; } -- 2.30.2